using System;
using UnityEngine;

namespace Yoozoo.Gameplay.Liberty.PlayerController
{
    public class BehaviorBase : MonoBehaviour
    {
        [SerializeField] 
        protected PlayerInputController behaviourManager;
        
        [SerializeField]
        private bool active = true;
        public bool Active
        {
            get => active;
            set => active = value;
        }
        
        protected PlayerInput PlayerInput => behaviourManager.playInput;
        protected PlayerAnimInput AnimInput => behaviourManager.animInput;


        private void Awake()
        {
            if (behaviourManager == null)
            {
                behaviourManager = GetComponentInParent<PlayerInputController>();
            }
        }

        public virtual void OnEnter()
        {
            
        }

        public virtual void OnExit()
        {
            
        }
        
        public virtual void OnUpdate()
        {
            
        }

        public virtual void OnFixedUpdate()
        {
            
        }

        public virtual void OnLateUpdate()
        {
            
        }
        
    }
}